#if !defined(AFX_MANUALUNLOADERLIFTER_H__ED07060C_47BD_4047_B772_93CC2DD3D745__INCLUDED_)
#define AFX_MANUALUNLOADERLIFTER_H__ED07060C_47BD_4047_B772_93CC2DD3D745__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ManualUnloaderLifter.h : header file
//
#include "Util\MinButton.h"
#include "Util\MinLabel.h"

// Control Layer
class IUnloaderLifter;
class IStateUnloaderLifter;
class IStateRingHandler;

// Process Layer
class IAutoManager;
class ITrsUnloaderLifter;
// Common Layer
class CDMControlCenter;
class CErrorCodeData;
class CSystemData;
class CModelData;
/////////////////////////////////////////////////////////////////////////////
// CManualUnloaderLifter dialog
#define MAX_UL_PUSH_SW	8
class CManualUnloaderLifter : public CDialog
{
// Construction
private:

	IUnloaderLifter* m_lnkUnloaderLifter;
	IStateUnloaderLifter* m_lnkStateUnloaderLifter;
	IStateRingHandler* m_lnkStateRingHandler;

	ITrsUnloaderLifter* m_lnkTrsUVChamber;
	
	CErrorCodeData* m_lnkErrorCodeData;
	CSystemData* m_lnkSystemData;
	CModelData* m_lnkModelData;
	
	void ErrorDisplay(int nErrorCode);
	BOOL m_bErrorDisplay;

	BOOL StartInitFlag;
	BOOL m_bOldStatusPush[MAX_UL_PUSH_SW];
	
	int m_iUpCassetteNo;
	int m_iLowCassetteNo;

public:
	UINT m_TimerID;
	BOOL m_TimerInitFlag;

	
public:
	CManualUnloaderLifter(IAutoManager* pAM, CDMControlCenter* pDMCC,CWnd* pParent = NULL);   // standard constructor
	
	CMinLabel	m_sRFIDReadingData;
	CMinLabel	m_sRFIDWritingData;
	CMinLabel	m_sUpCassetteNo;
	CMinLabel	m_sLowCassetteNo;
// Dialog Data
	//{{AFX_DATA(CManualUnloaderLifter)
	enum { IDD = IDD_MANUAL_UNLOADER_LIFTER };
	CMinButton	m_bULDoorClose;
	CMinButton	m_bULDoorOpen;
	CMinButton	m_bRFIDWriting;
	CMinButton	m_bULRingBack;
	CMinButton	m_bUpCassMove;
	CMinButton	m_bUpCassUp;
	CMinButton	m_bLowCassMove;
	CMinButton	m_bLowCassUp;
	CMinButton	m_bLowCassDown;
	CMinButton	m_bUpCassDown;
	CMinButton	m_bULRingFor;
	CMinButton	m_bULMZBack;
	CMinButton	m_bULMZFor;
	CMinButton	m_bULAlignFor;
	CMinButton	m_bULAlignBack;
	CMinButton	m_bRFIDRead;
	CMinButton	m_bExit;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CManualUnloaderLifter)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void ButtonInitial();
	void ButtonUpdate();
	// Generated message map functions
	//{{AFX_MSG(CManualUnloaderLifter)
	afx_msg void OnDestroy();
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnUlAlignFor();
	afx_msg void OnUlAlignBack();
	afx_msg void OnUlRingFor();
	afx_msg void OnUlRingBack();
	afx_msg void OnUlMzFor();
	afx_msg void OnUlMzBack();
	afx_msg void OnUpperMove();
	afx_msg void OnUpCassetteUp();
	afx_msg void OnUpCassetteDown();
	afx_msg void OnLowerMove();
	afx_msg void OnLowCassetteUp();
	afx_msg void OnLowCassetteDown();
	afx_msg void OnRfidRead();
	afx_msg void OnExit();
	afx_msg void OnRfidWriting();
	afx_msg void OnUlDoorOpen();
	afx_msg void OnUlDoorClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MANUALUNLOADERLIFTER_H__ED07060C_47BD_4047_B772_93CC2DD3D745__INCLUDED_)
